﻿using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class LightSensor : MonoBehaviour {

    private static List<LightSensor> lights = new List<LightSensor>();

    public static bool IsInAnyLight(Vector3 position, GameObject targetObject) {
        foreach (LightSensor lightSensor in lights) {
            if (lightSensor.IsInLight(position, targetObject)) {
                return true;
            }
        }
        return false;
    }

    protected void AddLight(LightSensor light) {
        lights.Add(light);
    }

    public virtual bool IsInLight(Vector3 position, GameObject targetObject) {
        return false;
    }

    // Use this for initialization
    void Start () {
    
    }
    
    // Update is called once per frame
    void Update () {
    
    }
}
